<div style="padding: 15px" xmlns:th="http://www.thymeleaf.org">
    <div class="row">
        <div class="col-xs-6 col-md-3" th:each="item:${list}" th:object="${item}">
            <a class="thumbnail fyl-cp select-image" th:data-id="*{id}" th:data-url="${frdn}+*{imageUrl}">
                <img data-src="holder.js/100%x180" th:alt="*{name}" style="height: 180px; width: 100%; display: block;"
                     th:src="${frdn}+*{imageUrl}" data-holder-rendered="true">
            </a>
        </div>
    </div>
</div>
<script>
    $(".select-image").click(function () {
        layer.close(layer.index);
        var image = {"id": $(this).data("id"), "url": $(this).data("url")};
        fillImage(image);
    })
</script>